<?php
$items = isset($items) ? $items : array();
?>
<div id="<?php echo $id ?>" class="input-text autocomplete-holder" ac-src-url="<?php echo $source ?>">
	<?php if ( !empty($items) ) {
		foreach($items as $item) {
			echo '<a class="ac-item"><input type="hidden" name="'.$id.'[]" value="'.$item->$value_field.'" />'.$item->$name_field.'</a>';
		}
	} ?>
</div>